<template>
  <div>
    <div class="main_node_list">
      <tableIndex
        :tableData="state.tableData"
        :tableHead="tableHead"
        :isIndex="false"
        :notSearch="true"
        :isSelection="false"
        :isRadio="false"
        :height="800"
        :isPaging="false"
        :page="state.page"
        @page-change="pageChange"
      >
      </tableIndex>
    </div>
  </div>
</template>
<script setup>
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
import tableIndex from '@/components/table/index.vue'
import { ElRow, ElCol, ElCard } from 'element-plus'
import { projectConfigApi } from '@/api/project'

import '@/views/constructionProjectManage/static/button.scss'
const state = reactive({
  tableData: [],
  page: {
    page: 1,
    pageSize: 10,
    total: 0
  }
})

const tableHead = reactive([
  {
    label: '任务类型',
    prop: 'name'
  },
  {
    label: '行为类型',
    prop: 'actionName'
  }
])
// 行为
const getActionList = () => {
  projectConfigApi.getActionList().then((res) => {
    const { code, data, msg } = res
    if (code == 200) {
      state.tableData = data
      state.tableData.forEach((item) => {
        item.name = '公共任务'
      })
    }
  })
}
onMounted(() => {
  getActionList()
})
</script>
<style lang="scss" scoped>
.main_node_list {
  margin-top: 20px;
  .nodeListItem {
  }
}
</style>
